package com.example.weathermvvm.ui.weather

import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import com.example.weathermvvm.data.WeatherRepository

/**
 *
 * @Author： LJH
 * @Time： 2022/8/15
 * @description：
 */
class WeatherModelFactory(private val repository:WeatherRepository):ViewModelProvider.NewInstanceFactory() {

    override fun <T : ViewModel?> create(modelClass: Class<T>): T {
        return WeatherViewModel(repository) as T
    }
}